package com.example.apple_starter.service;

import java.util.Arrays;

public class AppleService {

    /**
     * 苹果名字，比如红富士
     */
    private  String name;
    /**
     * 苹果尺寸范围,[40,60]
     */
    private float[] rangeForBig;
    /**
     * 价格波动允许范围
     */
    private float[] rangeForPrice;
    /**
     * 颜色
     */
    private  String Color;


    public String getName() {
        return name;
    }

    protected void setName(String name) {
        this.name = name;
    }

    public float[] getRangeForBig() {
        return rangeForBig;
    }

    protected void setRangeForBig(float[] rangeForBig) {
        this.rangeForBig = rangeForBig;
    }

    public float[] getRangeForPrice() {
        return rangeForPrice;
    }

    protected void setRangeForPrice(float[] rangeForPrice) {
        this.rangeForPrice = rangeForPrice;
    }

    public String getColor() {
        return Color;
    }

    protected void setColor(String color) {
        Color = color;
    }

    @Override
    public String toString() {
        return "AppleService{" +
                "name='" + name + '\'' +
                ", rangeForBig=" + Arrays.toString(rangeForBig) +
                ", rangeForPrice=" + Arrays.toString(rangeForPrice) +
                ", Color='" + Color + '\'' +
                '}';
    }

   public AppleService AppleServiceBuilder(Builder builder){

        return builder.getApple();
   }
}
